import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;



public class Ex1_2 {
	
	
	
	public static void main (String[] args) {
		
		try {
			String dataIn = KmerCounter.readFile("c:\\dataset_3_2.txt").trim();	
			
			StringBuilder sb = new StringBuilder();
			
			for (int i=0;i<dataIn.length();i++) {
				String nuc = dataIn.substring(i,i+1);
				if (nuc.equals("A")) {
					sb.append("T");
				} else if (nuc.equals("C")) {
					sb.append("G");
				}  else if (nuc.equals("T")) {
					sb.append("A");
				}	else if (nuc.equals("G")) {
					sb.append("C");
				}			
				
				
			} // for		
			
			sb.reverse();
			
		    File f=new File("c:\\writeContentfile.txt");
		    FileWriter fwriter = new FileWriter(f);
            BufferedWriter bwriter = new BufferedWriter(fwriter);
            bwriter.write(sb.toString());
            bwriter.close();
			
			
			
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
	}
	
	

}
